#pragma once
#include <opencv\cv.h>
#include <opencv\highgui.h>

class YUVFrameConverter
{
public:
	YUVFrameConverter(void);
	~YUVFrameConverter(void);

	void initialize();

	inline void setFrameWidth( int w ) { _frameWidth = w; }
	inline void setFrameHeight( int h ) { _frameHeight = h; }

	void convert( char* buf, char* fileName );
	void copyImageData( char* dst );

private:
	int _frameWidth;
	int _frameHeight;

	IplImage* _py;
	IplImage* _pu;
	IplImage* _pv;
	IplImage* _pu_big;
	IplImage* _pv_big;
	IplImage* _image;
};

